<template>
  <div>
    <img v-show="i===index" v-for="(item,i) in imglist" :src="item" alt>
  </div>
</template>

<script>
export default {
  data() {
    return {
      index: 0
    };
  },
  mounted() {
    setInterval(() => {
      if (this.index === this.imglist.length-1) this.index = -1;
      this.index++;
    }, 1000);
  },
  props: ["imglist"]
};
</script>

<style>
</style>
